﻿<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0,minimum-scale=1.0,maximum-scale=1.0" />
    <meta name="author" content="火星科技 http://mars2d.cn " />
    <meta name="apple-touch-fullscreen" content="yes" />
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <meta name="apple-mobile-web-app-status-bar-style" content="black" />
    <meta name="format-detection" content="telephone=no" />
    <meta name="x5-fullscreen" content="true" />
    <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1" />
    <link rel="shortcut icon" type="image/x-icon" href="/img/favicon/favicon.ico" />

    <meta name="keywords" content="火星科技,leaflet,mars2d,GIS,marsgis,二维,地图,地球,开发,框架,系统,示例,资料,模型,离线,外包,合肥,安徽,中国" />
    <meta
      name="description"
      content="火星科技 合肥火星 合肥火星科技 合肥火星科技有限公司 leaflet leaflet框架 leaflet开发 leaflet leaflet开发 leaflet框架 二维 地图 模型  gis marsgis 地图离线 地图开发 地图框架 地图外包 框架 开发 外包  地图离线 二维地图 二维地图 全景漫游 地理信息系统 云GIS 二维GIS GIS平台 WebGIS"
    />

    <title>Mars2D地图 |二维地图| 火星科技|合肥火星科技|合肥火星科技有限公</title>

    <script
      type="text/javascript"
      src="/lib/include-lib.js"
      libpath="/lib/"
      include="jquery,font-awesome,bootstrap,layer,haoutil,mars2d"
    ></script>
    <link href="/css/style.css" rel="stylesheet" />
  </head>

  <body>
    <div id="mars2dContainer" class="mars2d-container"></div>

    <!-- 面板 -->
    <div class="infoview">
      显示： <input id="txtCount" type="number" value="1" min="0.1" max="100.0" step="0.1" class="form-control" style="width: 120px" />
      万条
      <input type="button" class="btn btn-primary" value="生成" id="btnShowData" />
      <input type="button" class="btn btn-primary" value="生成个性绘制" id="btnShowData2" />
      <input type="button" class="btn btn-primary" value="清除" id="btnClearData" />
    </div>

    <script src="/js/common.js"></script>
    <script src="./map.js"></script>
    <script type="text/javascript">
      "use script" //开发环境建议开启严格模式

      // var map
      // let canvasMarkerLayer

      function initUI() {
        $("#btnClearData").click(function () {
          // canvasMarkerLayer.clear()
          clearData()
        })
        $("#btnShowData").click(function () {
          haoutil.loading.show()
          let startTime = new Date().getTime()

          let numPoints = Number($("#txtCount").val()) * 10000
          addMarkers(numPoints)

          haoutil.loading.close()
          let endTime = new Date().getTime()
          // 两个时间戳相差的毫秒数
          let usedTime = (endTime - startTime) / 1000
          console.log(usedTime)

          haoutil.msg("共耗时" + usedTime.toFixed(2) + "秒")
        })
        $("#btnShowData2").click(function () {
          haoutil.loading.show()
          let startTime = new Date().getTime()

          let numPoints = Number($("#txtCount").val()) * 10000
          addCustomDrawMarkers(numPoints)

          haoutil.loading.close()
          let endTime = new Date().getTime()
          // 两个时间戳相差的毫秒数
          let usedTime = (endTime - startTime) / 1000
          console.log(usedTime)

          haoutil.msg("共耗时" + usedTime.toFixed(2) + "秒")
        })
      }
    </script>
  </body>
</html>
